"""添加会话跟踪字段

Revision ID: xxx
Revises: previous_revision
Create Date: 2024-xx-xx

"""
from alembic import op
import sqlalchemy as sa

def upgrade():
    op.add_column('user', sa.Column('session_token', sa.String(100), unique=True))
    op.add_column('user', sa.Column('last_login', sa.DateTime))

def downgrade():
    op.drop_column('user', 'session_token')
    op.drop_column('user', 'last_login') 